import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import '@/styles/index.scss' // global css

import App from './App'
import store from './store'
import router from './router'
import Print from 'vue-print-nb'
Vue.use(Print);
import '@/icons' // icon
import '@/permission' // permission control
import plugin from '@/utils/plugin'
import * as alldir from '@/directive/index'
import * as allFilter from '@/filter/index'
Object.keys(alldir).forEach(item => {
  Vue.directive(item, alldir[item])
})
Object.keys(allFilter).forEach(item => {
  Vue.filter(item, allFilter[item])
})
Vue.use(ElementUI)
Vue.use(plugin)
Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
